package com.策略模式;

/**
 * @author Fang Ruichuan
 * @date 2022-09-28 12:25
 */

public class DecisionDemo {
    public static void main(String[] args) throws Exception {
//        TaxStrategy taxStrategy = AutoRegisterTaxStrategyFactory.getTaxStrategy(TaxType.INTER);
//        System.out.println(taxStrategy.calc(100));

//        TaxStrategy taxStrategy = AnnotationTaxStrategyFactory.getTaxStrategy(TaxType.INTER);
//        System.out.println(taxStrategy.calc(100));
        TaxStrategy taxStrategy = MapTaxStrategyFactory.getTaxStrategy(TaxType.INTER);
        System.out.println(taxStrategy.calc(100));
    }
}
